<template>
    <div :class="['feed-img',isVideo?'radius':'']">
        <img :src="image">
        <div class="playBtn" v-if="isVideo">
            <i class="iconfont icon-bofangqi-bofang"></i>
        </div>
    </div>
</template>

<script>
export default {
    props:{
        images:String,
        isVideo:{
            type:Boolean,
            default:false
        }
    },
    computed:{
        image(){
            let str=this.images.replace('w.h','140.93');
            return str;
        }
    }
}
</script>

<style lang="less" scoped>
.feed-img{
    width: 140px;
    height: 93px;
    position: relative;
    overflow: hidden;

    &.radius{
        border-radius: 10px;
    }

    img{
        display: block;
        width: 100%;
        height: 100%;
    }

    .playBtn{
        width: 32px;
        height: 32px;
        position: absolute;
        border-radius: 50%;
        left: 50%;
        top: 50%;
        transform: translate(-50%,-50%);
        background-color: hsla(0,0%,100%,.9);
        line-height: 32px;
        text-align: center;

        i{
            position: absolute;
            font-size: 20px;
            left: 7px;
            top: 0px;
            color: #222;
        }
    }
}
</style>